<?php
if (!isset($_SESSION)) {session_start();if(!isset($_SESSION['username'])){$_SESSION['username']='';}}
if ($_SESSION['username']==NULL){exit('提问请先<a href="login.php?action=ask">登录</a>!');}

require_once('lib/connbae.php');

$result = mysql_query("SELECT * FROM Question");

while($row = mysql_fetch_array($result))
{
	echo $row['id']." "
		. $row['username']." "
		. $row['title']." "
		. $row['content']." "
		. $row['posttime']." "
		. $row['totalview']." "
		. $row['reply']." "
		."<br />";
}

mysql_close($con);
?>